Skip to content

[cherrypick - 610] add support for configurable entities limit for the connections browser - #1421

Open
GnsP wants to merge 1 commit into
cdapio:release/6.10from
GnsP:cherrypick-1403-610
Open

[cherrypick - 610] add support for configurable entities limit for the connections browser#1421
GnsP wants to merge 1 commit into
cdapio:release/6.10from
GnsP:cherrypick-1403-610

Conversation

@GnsP

@GnsP GnsP commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

cherrypick of #1403

Description

Summary of changes

PR Type

  • Bug Fix
  • Feature
  • Build Fix
  • Testing
  • General Improvement
  • Cherry Pick

Links

Jira: Jira issue #

Test Plan

Screenshots

@GnsP
GnsP requested a review from radhikav1 June 30, 2026 04:30
@GnsP GnsP added the build triggers github action label Jun 30, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request makes the Wrangler connection browsing entity limit configurable, replacing the hardcoded limit of 1000 with a default of 2000. Feedback points out that a negative configuration value could bypass the fallback logic and suggests ensuring the parsed limit is a positive integer.

Comment thread server/express.js
hstsPreload: cdapConfig['hsts.preload'],
runRecordsTtl: cdapConfig['app.run.records.ttl.days'],
defaultPollIntervalMs: parseInt(cdapConfig['ui.default.poll.interval.millis'], 10) || 10000,
defaultWranglerBrowseEntitiesLimit: parseInt(cdapConfig['ui.wrangler.connections.browse.entities.limit'], 10) || 2000,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

If the configuration ui.wrangler.connections.browse.entities.limit is set to a negative number (e.g., "-100"), parseInt will return -100. Since -100 is truthy in JavaScript, the expression parseInt(...) || 2000 will evaluate to -100, which is an invalid limit and could cause the backend API to fail.

We should ensure the parsed limit is a positive integer, falling back to 2000 if it is less than or equal to 0 or invalid.

Suggested change
defaultWranglerBrowseEntitiesLimit: parseInt(cdapConfig['ui.wrangler.connections.browse.entities.limit'], 10) || 2000,
defaultWranglerBrowseEntitiesLimit: Math.max(parseInt(cdapConfig['ui.wrangler.connections.browse.entities.limit'], 10) || 0, 0) || 2000,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build triggers github action

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants